package ProxyDemo.unstatic_proxy.SellWine;

import java.lang.reflect.Proxy;

public class Test {
    public static void main(String[] args) {

        MaoTaiJiu maoTaiJiu = new MaoTaiJiu();
        SellMaoTai sellMaoTai = new SellMaoTai(maoTaiJiu);

        SellWine dynamicProxy = (SellWine) Proxy.newProxyInstance(MaoTaiJiu.class.getClassLoader(),
                MaoTaiJiu.class.getInterfaces(), sellMaoTai);
        dynamicProxy.sell();
    }
}
